<script type="text/ng-template" id="headerCheckbox.html">
    <label class="i-checks i-checks-sm">
        <input type="checkbox" ng-model="vm.checkboxes.checked" class="select-all" value="" /><i></i>
    </label>
</script>
<div class="wrapper-xs">
    <div class="panel panel-info">
        <div class="panel-heading font-bold">商品列表</div>
        <!-- <div class="panel-body">
             <a ng-click="vm.add()" class="btn btn-info btn-sm m-l-sm">新增</a>
             <a ng-click="vm.update()" ng-disabled="!vm.row.checked" class="btn btn-success btn-sm m-l-sm">更新</a>
         </div>-->
        <div class="table-responsive">
            <table ng-table="vm.productTableParam"
                   class="table table-condensed table-bordered table-hover table-striped">
                <tbody>
                <tr ng-repeat="row in $data track by $index">
                    <td header="'headerCheckbox.html'" class="text-center">
                        <label class="i-checks i-checks-sm">
                            <input type="checkbox" ng-model="vm.checkboxes.items[row.id]" /><i></i>
                        </label>
                    </td>
                    <td title="'ID'" sortable="'id'"  width="10px">
                        {{row.id}}
                    </td>
                    <td title="'产品名称'" sortable="'name'"  header-class="'text-left'">{{row.name}}</td>
                    <td title="'货号'" sortable="'itemNo'"  header-class="'text-left'">{{row.itemNo}}</td>
                    <td title="'产品规格'" sortable="'size'"  header-class="'text-left'">{{row.size}}</td>
                    <td title="'销售价格'" sortable="'saleAmt'" class="text-right" header-class="'text-right'">{{row.saleAmt|number:'2' }}</td>
                    <td title="'单位'" sortable="'unit'"  header-class="'text-left'">{{row.unit}}</td>
                    <td title="'数量'" sortable="'number'" class="text-right" header-class="'text-center'" width="140px">
                        <input ui-jq="TouchSpin" type="text" ng-model="row.number" class="form-control input-sm" data-min='0' data-max="1000" data-step="1">
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>